<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>登录</title>
    <link rel="stylesheet" href="/frame/layui/css/layui.css">
    <link rel="stylesheet" href="/css/style.css">
    <link rel="icon" href="/image/logo.png">
</head>

<body class="login-body body">

<div class="login-box">
    <form class="layui-form layui-form-pane" method="get" action="">
        <div class="layui-form-item">
            <h3>欢迎登陆101运营系统</h3>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">账号：</label>

            <div class="layui-input-inline">
                <input type="text" name="userName" class="layui-input" lay-verify="required" placeholder="账号" autocomplete="on" maxlength="20" />
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">密码：</label>

            <div class="layui-input-inline">
                <input type="password" name="password" class="layui-input" lay-verify="password" placeholder="密码" maxlength="20" />
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">验证码：</label>

            <div class="layui-input-inline">
                <input type="text" name="checkcode" class="layui-input half" lay-verify="code" placeholder="验证码" maxlength="4" /><img id="valid-img" alt="">
            </div>
        </div>
        <div class="layui-form-item">
            <button type="reset" class="layui-btn layui-btn-danger btn-reset">重置</button>
            <button type="button" class="layui-btn btn-submit" lay-submit="" lay-filter="login">立即登录</button>
        </div>
    </form>
</div>

<script type="text/javascript" src="/frame/layui/layui.js"></script>
<script src="/js/common/module-manage.js"></script>
</body>

<script>
    //一般直接写在一个js文件中
    layui.use(['jquery','layer', 'form'], function(){
        var $ = layui.$, layer = layui.layer, form = layui.form;
        //监听提交
        form.on('submit(login)', function(data){

            var param ={
                username :data.field.userName,
                password :data.field.password,
                checkcode :data.field.checkcode
            }
            layer.msg(param);
            /*$.ajax({
                type: "POST",
                url: "/webLogin",
                data: param,
                success: function(resoult){
                    if(resoult.code=='SUCCESS'){
                        console.info(resoult.message);
                    }else{
                        console.info(resoult.message);
                    }

                }
            });*/



            return false;
        });
    });
</script>

</html>